package com.msteam.extra.model;


import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.msteam.extra.generator.Display;
import com.msteam.extra.model.base.BaseModel;

import lombok.JFinalModel;

@JFinalModel
@Entity
@Display("测试主表")
@Table(name = "TABLE_MASTER")
public class MasterModel extends BaseModel<MasterModel> {
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="ID")
	private Long id;
	
	@Column(name="NAME")
	private String name;
	
	@Column(name="SORT_ID")
	private Integer sort;

	@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
	private List<DetailModel> details;
	
}
